package com.atguigu.gulimallseckill.xxljob;

import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

@Slf4j
@Component
public class RunXxlJob {

    @XxlJob(value = "demoJobHandler")
    public void runJob(){

        log.info("Xxl-job运行成功");
    }

    public static void main(String[] args) {
        LocalDate now = LocalDate.now();
        LocalDate localDate = now.minusDays(5);
        LocalTime min = LocalTime.MIN;
        LocalTime now1 = LocalTime.now();
        System.out.println(now1);
        LocalDateTime of = LocalDateTime.of(localDate, min);

        System.out.println(of);
        LocalDateTime now2 = LocalDateTime.now();

        System.out.println(now2);
    }

}
